package com.cy.pj.common.pojo;

import javax.validation.constraints.Min;

/*
 * 响应数据是正常还是异常*/
public class Response {
    @Min(0)
    private Integer state = -2;//1 true，0 false
    private String message = "XING";
    private Object Data;

    public Response(String msg) {
        this.message = msg;
    }

    public Response(Integer state) {
        this.state = state;
    }

    public Response(Object data) {
        this.Data = data;
    }

    public Response() {
    }

    public Response(Throwable e) {
        this.state = 0;
        this.message = e.getMessage();
    }

}
